﻿namespace dotNetMagazin201108.BusinessLayer
{
    public class Contact
    {
        public int Id { get; set; }
        public string LastName { get; set; }
        public string FirstName { get; set; }
        public string Email { get; set; }
        public string Phone { get; set; }
        public int CompanyId { get; set; }

        public Contact()
        {
            LastName = string.Empty;
            FirstName = string.Empty;
            Email = string.Empty;
            Phone = string.Empty;
        }

        public bool IsValid
        {
            get
            {
                return !string.IsNullOrEmpty(LastName) && (CompanyId != 0);
            }
        }
    }
}
